<template lang="">
    <div>
        <div class="table-body-box">
            <div class="study-center-form">
                <el-form style="margin-left:60px;margin-top:25px;" :inline="true">
                    <!-- <el-form-item class="init-label" style="margin-bottom:20px;" label="管理部门：">
                        <el-select
                            size="small"
                            v-model="planObj.deptName"
                            filterable
                            remote
                            clearable 
                            placeholder="请输入关键词"
                            @change="handleSelect"
                            :remote-method="querySearch"
                            :loading="loading">
                            <el-option
                                v-for="item in teaSelectList"
                                :key="item.userId"
                                :label="item.name"
                                :value="item.name">
                            </el-option>
                        </el-select>
                    </el-form-item> -->
                    <el-form-item label="制度名称：">
                        <el-input
                        style="width:193px;"
                        clearable
                        size="small"
                        placeholder="请输入内容"
                        v-model="planObj.workDescribe">
                        </el-input>
                    </el-form-item>
                    
                </el-form>
                <div class="btn-box">
                    <el-button type="primary" @click="addThings"  size="small">新增</el-button>
                    <el-button type="primary" @click="searchList(1,10)" :loading="searchLoading" size="small">查询</el-button>
                </div>
            </div>
            <div class="study-center-table">
                <el-table 
                row-class-name="greyRow"
                height="70vh"
                :data="tableData" 
                style="width: 100%" 
                @selection-change="handleSelectionChange"
                :header-cell-style="{background:'#4787E3',color:'#ffffff'}">
                    <!-- <el-table-column
                        type="selection"
                        width="55">
                    </el-table-column> -->
                    <!-- <el-table-column show-overflow-tooltip prop="deptName" label="管理部门" align="center">
                    </el-table-column>
                    <el-table-column show-overflow-tooltip prop="workType" label="制度类别" align="center">
                    </el-table-column> -->
                    <el-table-column show-overflow-tooltip prop="workDescribe" label="制度名称" align="center">
                    </el-table-column>
                    <el-table-column show-overflow-tooltip prop="createTime" label="创建时间" align="center">
                    </el-table-column>
                    
                    <el-table-column
                        align="center"
                        fixed="right"
                        label="操作" 
                        width="140">
                    <template slot-scope="scope">
                        <!-- <el-button style="text-decoration:underline;" type="text" @click="applyClick(scope.row)" size="small">编辑</el-button> -->
                        <el-button style="text-decoration:underline;" type="text" @click="deleteClick(scope.row)" size="small">删除</el-button>
                    </template>
                    </el-table-column>
                </el-table>
                <div class="study-center-pagination flex-row">
                  <pagination 
                    @pageTurnNum="pageNum" 
                    @pageTurnSize="pageSizeNum" 
                    :total="total"></pagination>
                </div>
            </div>
        </div>
        <el-dialog
        :title="thingsText"
        :close-on-click-modal='false'
        :visible.sync="checkApply"
        width="800px"
        @closed="diloagClose"
        :before-close="handleClose">
          <div v-loading="smallLoading" class="class-detail-box">
               <div style="margin-bottom:25px;" class="tips-box">
                    <div class="class-tips">{{tingsTip}}</div>
                </div>
                <div class="teacher">
                    <el-form
                        style="padding-left: 99px;"
                        label-width='120px'
                        ref="planForm" 
                        :model="planUpload" 
                        :rules="planRules" 
                    >
                        <!-- <el-form-item class="init-label is-required" style="margin-bottom:20px;" label="管理部门：">
                            <el-select
                                size="small"
                                v-model="planUpload.deptName"
                                filterable
                                remote
                                clearable
                                placeholder="请输入关键词"
                                @change="handleSelect"
                                :remote-method="querySearch"
                                :loading="loading">
                                <el-option
                                    v-for="item in teaSelectList"
                                    :key="item.userId"
                                    :label="item.name"
                                    :value="item.name">
                                </el-option>
                            </el-select>
                        </el-form-item> -->
                        <!-- <el-form-item style="margin-bottom:20px;" prop="workType" label="制度类别：">
                            <el-input
                                clearable
                                size="small"
                                placeholder="请输入内容"
                                v-model="planUpload.workType">
                            </el-input>
                        </el-form-item> -->
                        <el-form-item label="制度名称：" prop="workDescribe">
                            <!-- <el-input resize="none" style="width:500px;height:90px !important;margin-top:5px;" type="textarea" v-model="planUpload.workDescribe"></el-input> -->
                            <el-input
                                clearable
                                size="small"
                                placeholder="请输入内容"
                                v-model="planUpload.workDescribe">
                            </el-input>
                        </el-form-item>
                        <el-form-item style="margin-top:20px;" label="添加附件：">
                            <el-upload
                            style="width:300px;"
                            class="upload-demo"
                            ref="uploads"
                            action="#"
                            accept=".xlsx,.xls,.doc,.docx"
                            :limit='1'
                            :on-exceed='limitNums'
                            :on-remove="limitRemoves"
                            :on-change="addAttachments"
                            :file-list="fileListMenus"
                            :auto-upload="false">
                            <!-- <i style="padding:0 20px;" slot="trigger" class="el-icon-plus"></i> -->
                            <el-button slot="trigger" size="small" type="default">选取文件</el-button>
                            </el-upload>
                            <P class="text">文件格式（.xlsx,.xls,.doc,.docx），请保证文件格式正确</P>
                        </el-form-item>
                    </el-form>
                </div>
            </div>
        <div style="text-align:center;padding:36px 0 26px 0;">
          <span slot="footer"  class="dialog-footer">
              <el-button size="small" :loading="disAgree"  @click="checkApply = false">取 消</el-button>
              <el-button size="small" :loading="agree" type="primary" @click="apply">确 定</el-button>
          </span>
        </div>
        </el-dialog>
    </div>
</template>
<script src="./thingsTip/thingsTip"></script>
<style lang="less" scoped>
@import url("~@/pagecss/studyCenter");
@import url("~@/pagecss/classApply");
</style>